<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Promise微任务处理复杂任务</title>
</head>
<body>
    <script>
        async function hd(num){
            let res = await Promise.resolve().then(value => {
                let count = 0;
                for(i = 0; i < num; i++){
                    count += num--;
                }
                return count;
            })
            console.log(res);
        }

        hd(5435649);
        console.log("后盾人");
    </script>
</body>
</html>